package com.sumainfor.zuul.controller.epc;

import com.sumainfor.common.util.JsonResult;
import com.sumainfor.zuul.dao.SysDeptDao;
import com.sumainfor.zuul.dao.SysUserDao;
import com.sumainfor.zuul.dao.ZfeignMapper;
import com.sun.javafx.collections.MappingChange;
import net.bytebuddy.asm.Advice;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

/**
 * <p>
 * 工程部调用
 * <p>
 *
 * @author: zc
 * @create: 2019-09-03 17:52
 **/
@RestController
@RequestMapping("/provider/epcHousing")
public class EpcHousingAlterController {

    @Autowired
    SysDeptDao sysDeptDao;

    @Autowired
    SysUserDao sysUserDao;

    @Autowired
    ZfeignMapper zfeignMapper;


    /**
     * 根据服务中心编号集合获取服务中心名称
     * @author zhoucong
     * @data 2019/9/3
     * @Param
     * @return
     */
    @PostMapping("/getDeptNameByDeptId")
    public JsonResult getDeptNameByDeptId(@RequestBody Map<String,Object> params){
        JsonResult result = new JsonResult();
        return result.put(zfeignMapper.getDeptNameByDeptId(params));
    }

    @PostMapping("/getLoginNameList")
    public JsonResult getLoginNameList(@RequestBody Map<String,Object> params){
        JsonResult result = new JsonResult();
        return result.put(sysUserDao.getLoginNameList(params));
    }
}
